package com.kcwl.carrier.domain.repository;

import com.kcwl.carrier.domain.entity.CarrierForeignDriverCondition;
import com.kcwl.carrier.domain.entity.CarrierForeignDriverDetailInfo;
import com.kcwl.carrier.domain.entity.CarrierForeignDriverInfo;
import com.kcwl.carrier.domain.entity.CarrierForeignDriverListInfo;
import com.kcwl.carrier.infrastructure.repository.po.CarrierCooperationMappingPO;
import com.kcwl.ddd.domain.entity.KcPage;
import com.kcwl.ddd.domain.repository.IBaseRepository;

import java.util.List;

/**
 * @author zxx
 * @date 2022年11月28日 16:33
 * @Description
 */
public interface IForeignDriverRepository extends IBaseRepository<CarrierCooperationMappingPO> {

    List<CarrierForeignDriverInfo> getByIds(List<Long> ids);

    int insert(CarrierForeignDriverInfo carrierForeignDriverInfo);

    int delete(Long id);

    int updateById(Long id);

    KcPage<CarrierForeignDriverListInfo> getForeignDriverList(CarrierForeignDriverCondition carrierForeignDriverCondition);

    CarrierForeignDriverDetailInfo getForeignDriverDetail(CarrierForeignDriverCondition condition);

    int reAddForeignDriver(Long id);

    /**
     * 通过用户id获取外协司机id列表
     */
    List<Long> selectDriverIdsByCarrierId(Long userId);

    List<Long> selectVehicleIdsByUserId(Long userId);

    int enableForeignDriver(Long id);
}
